import {Injectable, Injector} from '@angular/core';
import {ServicesModule} from './services.module';
import {BaseService} from './base/base.service';
import {User} from '../entity/admin';

@Injectable({
  providedIn: ServicesModule
})
export class RegisterService extends BaseService {

  constructor(public injector: Injector) {
    super(injector);
  }

  checkUserName(userName) {
    return this.httpServer.postUrl<any>(this.uri + 'admin/checkUserName', userName);
  }

  registerUser(user: User) {
    return this.httpServer.postBody(this.uri + 'admin/registerUser', user);
  }
}
